Skip to main content
POST
/
v1
/
flux-pro
Generate an image with FLUX.1 [pro].
curl --request POST \
  --url https://api.bfl.ai/v1/flux-pro \
  --header 'Content-Type: application/json' \
  --header 'x-key: <api-key>' \
  --data '{
  "prompt": "ein fantastisches bild",
  "image_prompt": "<string>",
  "width": 1024,
  "height": 768,
  "steps": 40,
  "prompt_upsampling": false,
  "seed": 42,
  "guidance": 2.5,
  "safety_tolerance": 2,
  "interval": 2,
  "output_format": "jpeg",
  "webhook_url": "<string>",
  "webhook_secret": "<string>"
}'
{
  "id": "<string>",
  "polling_url": "<string>"
}

Authorizations

x-key
string
header
required

Body

application/json
prompt
string | null
default:""

Text prompt for image generation.

Example:

"ein fantastisches bild"

image_prompt
string | null

Optional base64 encoded image to use as a prompt for generation.

width
integer
default:1024

Width of the generated image in pixels. Must be a multiple of 32.

Required range: 256 <= x <= 1440Must be a multiple of 32
height
integer
default:768

Height of the generated image in pixels. Must be a multiple of 32.

Required range: 256 <= x <= 1440Must be a multiple of 32
steps
integer | null
default:40

Number of steps for the image generation process.

Required range: 1 <= x <= 50
Example:

40

prompt_upsampling
boolean
default:false

Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.

seed
integer | null

Optional seed for reproducibility.

Example:

42

guidance
number | null
default:2.5

Guidance scale for image generation. High guidance scales improve prompt adherence at the cost of reduced realism.

Required range: 1.5 <= x <= 5
Example:

2.5

safety_tolerance
integer
default:2

Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict.

Required range: 0 <= x <= 6
Example:

2

interval
number | null
default:2

Interval parameter for guidance control.

Required range: 1 <= x <= 4
Example:

2

output_format
enum<string> | null
default:jpeg

Output format for the generated image. Can be 'jpeg' or 'png'.

Available options:
jpeg,
png
webhook_url
string<uri> | null

URL to receive webhook notifications

Required string length: 1 - 2083
webhook_secret
string | null

Optional secret for webhook signature verification

Response

Successful Response

  • AsyncResponse
  • AsyncWebhookResponse
id
string
required
polling_url
string
required